<?php
class Settings {
	var $title = null;
	var $meta_desc = null;
	var $meta_keys = null;
	var $mail_address = null;
	var $friendly_url = 1;
	var $maintenance = 0;
	var $template = "default";
	
	function viewAll() {
		$query = "select * from dt_settings";
		$data = mysql_query($query);
		return $data;
	}
	
	function selectSingle(){
		$query = "select * from dt_settings where s_id = '1'";
		$data = mysql_query($query);
		return $data;
	}
	
	function update($title, $meta_desc, $meta_keys, $mail_address, $template, $iata_link, $iata_text, $trafic) {
		$query = "update dt_settings set s_title = '$title', s_meta_desc = '$meta_desc', s_meta_keys = '$meta_keys', s_mail_address = '$mail_address', s_friendly_url = '1', s_maintenance = '0', template = '$template', trafic_plugin = '$trafic', iata_link = '$iata_link', iata_text = '$iata_text'";
		mysql_query($query);
	}
}
?>